# Add additional files to your project_Cordova/Ionic

# Open your Xcode project

# Perform 'File >> Add Files to "TestApp_Swift"...' menu action

In dialog box, select "appsealing.lic", "AppsealingiOS.h" and "AppsealingiOS.mm (opens new window)"  files in "AppSealingSDK/Libraries/" folder and click "Add" button.

### Only if your project is Cordova based.

### (Do not refer this content if your project is not Cordova based)
Select project target then move to “Build Phase” tab. Click the left arrow icon of the “Copy Bundle Resources” item at the bottom of the “Build Phase” tab to expand the area.

When it is expanded as shown below, click the “+” icon.

A file selection window will appear and the three files you added earlier are displayed at the top. Select “appsealing.lic” among them and click “Add” button.

Make sure the “appsealing.lic” file is added as a bundle resource as shown below.

Now expand the “Classes” folder in the project navigation pane on the left and select the “MainViewController.m” file inside it then change the file extension to .mm. After making changes, open the file and add the line #include “AppSealingiOS.h” at the top. Then find the “init” method and put Appsealing(); line before return statement.

Finally, it should be in the form below.

For Cordova projects, If you do not add “Appsealing();” function call statement, the AppSealing static library is not automatically linked, so this line must be added for the AppSealing function to work properly. |

# Add Bridging Header into Ionic project

# Only if your project is Ionic based

### (Do not refer this content if your project is Cordova based)

Since your project is swift-based project, you would encounter a dialog box which asks you create a bridging header file or not only if there's no bridging header in your project yet. You should click "Create Bridging Header".

🔻

*Supposing your project already has bridging header file, the upper dialog box will not appear and you can use your existing bridging header file.

** If your project is Cordova based, the bridging header file is not used.

# Append AppSealing header to bridging header file (Ionic project only)

Select newly created "TestApp_Swift-Bridging-Header.h" file (or existing bridging header file) and append #import "AppsealingiOS.h" to end of document like below.

Last Updated: 11/19/2024, 6:55:37 AM